home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Resident(REL2) ARP User's Manual Resident(REL2)
-
-
-
- NAME
- Resident - Add, view or delete resident programs.
-
- SYNOPSIS
- Resident Filename/... AS/K DEL=Delete/s F=Full/s Q=Quiet/s
-
- DESCRIPTION
- Resident programs are the fastest loading, most memory
- efficient programs on the Amiga. A program which can run as
- resident will only have one copy of itself in memory at one
- time, no matter how many processes are running its code. The
- Resident command allows you to install, view and remove
- programs from the resident list.
-
- Resident by itself gives a list of all currently resident
- programs. If you specify FULL, then more information about
- each program is displayed, such as how many users each
- program has, where its code is stored in memory, and what
- its current checksum is.
-
- You can add programs to the resident list by simply typing
- the names of the disk files you want to add. Resident uses
- multiargs, so there is no limit to the number of files you
- can add with one command. Note that you can also specify
- wildcards, if you do, Resident will display the name of the
- file it is adding, unless you also specify the QUIET switch.
-
- All the files are stored by the last component of their
- name, no matter what the path to the file was. This means
- that occasionally you may have a name conflict, since
- Resident only allows programs to be added to the list whose
- names are different. To overcome this problem, you can use
- the AS keyword to give the disk file a different resident
- name. Note that you can only use one filename with the AS
- option, and no wildcards are allowed in this case.
-
- You can remove files from the resident list by typing their
- names, and specifying the Delete switch. Wildcard deletions
- are not currently supported, since it is fairly unusual to
- remove programs from the resident list.
-
- To actually take advantage of the Resident programs, you
- should invoke them with the ARP ARun command, or with a
- Shell that takes advantage of arp.library's process control
- primitives. Note that many programs can internally encode
- their stack size using this feature, and that can be a large
- memory saver as well.
-
- POSSIBLE PROBLEMS
- Not all programs will be happy as resident, it is probably
- fair to say that the large majority of commercial and public
- domain software will not be useable as resident. All the
-
-
-
- Page 1 (printed 2/22/88)
-
-
-
-
-
-
- Resident(REL2) ARP User's Manual Resident(REL2)
-
-
-
- ARP programs, and some commercial software such as TxED+
- will work beautifully as Resident. Hopefully more software
- developers will take advantage of the Resident code features
- of ARP, since it does provide a very memory efficient way to
- run multiple copies of programs, as well as the fastest
- possible load.
-
- In general, if a program does not work as Resident, the
- resident manager will be able to detect it before running
- your program, and will put up a requester informing you of
- this fact. You can simply remember not to make that
- particular program resident in the future. Even if a
- program returns a checksum error, you can remove it using
- the Resident DELETE switch to recover the memory.
-
- EXAMPLE
- Resident C/Type ; make type resident
- ARun Type DOCUMENTS To PRT:
- ARun Type DOCUMENTS TO SER:
- ARun df0:c/Type DOCUMENTS
-
- Note that even the last invocation of Type, using a full
- pathname, will still result in ARun launching the resident
- version of the program, rather than using the disk version,
- since the resident list is ALWAYS searched first.
-
- The three invocations of Type above will use roughly 1/3 the
- memory requirements that the same process using RUN would
- take. Additionally, since Resident programs can encode
- their stack size, and since most users use a very large
- stack from the CLI, the memory savings can be even greater.
- Here is a rough calculation:
-
- Three Type programs executing at the same time
- having been launched by the RUN command will take
- approximately 3552 bytes for their code (this is
- based on the ARP type). If the user stack is set at
- 10,000 bytes (actually this is a little low), the
- memory for the stack will be 30,000 bytes.
- Therefore, the total overhead, excluding any
- allocated memory by Type itself, is 30,3552 bytes.
-
- The same example using ARun will only use 1184 bytes
- of code, approximately, no matter how many types are
- executing at the same time. Furthermore, since the
- stack size is defined inside of the Type program (it
- uses a ResidentProgramTag), the total stack for
- three types will be 12000 bytes. So the total using
- Resident programs and ARun is 13,184 bytes,
- considerably less than the 30,3552 bytes using Run,
- which is even a low estimate.
-
-
-
-
- Page 2 (printed 2/22/88)
-
-
-
-
-
-
- Resident(REL2) ARP User's Manual Resident(REL2)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 3 (printed 2/22/88)
-
-
-
-
-
-
-